package com.card.vault.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.card.vault.dao.CardDAO;
import com.card.vault.domain.another.Card;

@Service
public class CardServiceImpl implements CardService {

	@Autowired
	private CardDAO cardDAO;
	
	@Transactional
	public void saveCard(Card card) {
		cardDAO.saveCard(card);
	}

	@Transactional
	public List<Card> cardList(int user_id) {
		return cardDAO.cardList(user_id);
	}

	@Transactional
	public void removeCard(int card_id) {
		cardDAO.removeCard(card_id);
	}

	@Transactional
	public Card retriveCard(int card_id) {
		return cardDAO.retriveCard(card_id);
	}

}
